package com.wjjun.app.matrix

import android.content.Context
import com.tencent.matrix.plugin.DefaultPluginListener
import com.tencent.matrix.plugin.Plugin
import com.tencent.matrix.report.Issue
import com.tencent.matrix.util.MatrixLog

class MatrixListener(context:Context) : DefaultPluginListener(context){

    private val tag = "MatrixListener"

    override fun onInit(plugin: Plugin?) {
        super.onInit(plugin)
    }

    override fun onStart(plugin: Plugin?) {
        super.onStart(plugin)
    }

    override fun onStop(plugin: Plugin?) {
        super.onStop(plugin)
    }

    override fun onDestroy(plugin: Plugin?) {
        super.onDestroy(plugin)
    }

    /**
     * 插件提交报告
     */
    override fun onReportIssue(issue: Issue?) {
        super.onReportIssue(issue)
        MatrixLog.e(tag, issue.toString())
    }
}